<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <include file="./Public/Admin/header.html" />
    <style>
        .form-horizontal .control-group {
            margin-bottom: 10px;
        }
        .input-medium {
            width: 480px;
        }
        input {
            width: 450px;
        }
    </style>
</head>
<body>
<div id="main">
    <div class="container-fluid">

        <div class="row-fluid">
            <div class="span12">
                <div class="box">
                    <div class="box-title">
                        <div class="span10">

                            <h3><i class="icon-edit"></i>任务规则编辑</h3>

                        </div>
                    </div>

                    <div class="box-content">
                        <form action="{:U('Admin/Rule/content')}" method="post" class="form-horizontal form-validate">
                            <div class="control-group">
                                <label for="content" class="control-label">内容：</label>
                                <div class="controls">
                                    <textarea name="content" style="width:80%;" id="content" class="input-medium" ><?php echo $info['content'];?></textarea>
                                </div>
                            </div>
                            <div class="form-actions">
                                <input type="hidden" name="id" id="id" value="1"/>
                                <input type="hidden" name="action" id="action" value="edit"/>
                                <button type="button" class="btn btn-primary" id="btnsave">保存</button>
                                <a class="btn" href="Javascript:window.history.go(-1)">取消</a>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript">
    var img_url = $("#img");
    var img_name = $("#show_img");
    $("#btnsave").click(function(){

        $("#btnsave").submit();
    });
</script>
<script type="text/javascript" charset="utf-8" src="__APP__/Public/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__APP__/Public/ueditor/ueditor.all.js"></script>
<script type="text/plain" id="upload_ue" style="display: none;"></script>
<script type="text/javascript" charset="utf-8" src="__APP__/Public/Admin/js/edit.js"></script>
<script type="text/javascript">
    //设置编辑器参数
    var param="type=<?php echo isset($utype)?$utype:''?>&comid=<?php echo isset($comid)?$comid:''?>&aid=<?php echo isset($accountid)?$accountid:''?>";
    var options = {
        initialFrameWidth:"100%",
        initialFrameHeight: 400,
        imageUrl:window.UEDITOR_CONFIG.UEDITOR_HOME_URL+"php/imageUp.php?"+param,
        fileUrl:window.UEDITOR_CONFIG.UEDITOR_HOME_URL+"php/fileUp.php?"+param,
        imageManagerUrl:window.UEDITOR_CONFIG.UEDITOR_HOME_URL + "php/imageManager.php?"+param,
        toolbars:[
            [ 'source', '|', 'undo', 'redo', '|',
                'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist',  '|',

                'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
                'indent',
                'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
                'link', 'unlink', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
                'insertimage', 'emotion',  'horizontal','|','help']
        ]
    };
    var ue = UE.getEditor('content', options);
</script>

</body>
</html>
